<template>
    <view class="list-item">
        <view class="item-head">
            <!-- <image src="/static/img/erp/icon_xsd.png" class="icon"></image> -->
            <view class="icon" v-if="item.BillName">
                {{ item.BillName.substr(0, 1) }}
            </view>
            <view class="icon" v-else></view>
            <view class="info">
                <view class="name">{{ item.BillName }}</view>
                <view class="no">{{ item.BillCode }}</view>
            </view>
            <view class="date">{{ item.BillDate }}</view>
        </view>
        <view class="item-con">
            <view class="c-line">
                <view>增加金额</view>
                <view>+{{ item.HjTotal }}</view>
            </view>
            <view class="c-line">
                <view>减少金额</view>
                <view>{{ item.BdJsTotal }}</view>
            </view>
            <view class="c-line">
                <view>本单净值</view>
                <view class="cr-main">+{{ item.TotalMoney }}</view>
            </view>
        </view>
    </view>
</template>

<script>
export default {
    components: {},
    props: {
        item: {
            type: Object,
            default: () => {},
        },
    },
    data() {
        return {}
    },
    mounted() {},
    onShow() {},
    methods: {
        toDetail(type) {
            this.easyGoTo("/pages_erpA8/account/detail")
        },
    },
}
</script>

<style lang="scss">
.list-item {
    padding: $app-item-padding;
    margin-bottom: 24rpx;
    background: #ffffff;
    border-radius: 24rpx;
    .item-head {
        display: flex;
        margin-bottom: 24rpx;
        // .icon{
        //     position: relative;
        //     top: 2px;
        //     width:32px;
        //     height: 32px;
        //     margin-right: 16rpx;
        // }
        .icon {
            position: relative;
            top: 2px;
            width: 32px;
            height: 32px;
            line-height: 32px;
            text-align: center;
            background: $color-main;
            border-radius: 40rpx;
            margin-right: 24rpx;
            font-size: 36rpx;
            color: #fff;
        }
        .info {
            flex: 1;
            font-size: $size-28;
            font-weight: bold;
            min-width: 0;
            .name {
                height: 40rpx;
                line-height: 40rpx;
            }
            .no {
                height: 40rpx;
                line-height: 40rpx;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
        }
        .date {
            margin-left: 10px;
            display: flex;
            justify-content: flex-start;
            font-size: $size-28;
            color: $color-gray-3;
        }
    }
    .item-con {
        background: #f5f5f5;
        border-radius: 12px;
        padding: 20rpx 32rpx 0;
        font-size: $size-28;
        .c-line {
            display: flex;
            justify-content: space-between;
            padding-bottom: 20rpx;
            .cr-main {
                color: $color-main;
            }
        }
    }
}
</style>
